import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:note/main.dart';
import 'package:note/tool/eventBus.dart';

// ignore: camel_case_types
class login_vm extends ChangeNotifier{


void login (String username,String password)async{
  if (username=='110' && password=='6155') {
   Navigator.popAndPushNamed(navigatorKey.currentContext!, 'home');
   }else{
  //  _showLoginError();
   eventBus.fire(EventLogin({'view':'login'}));
   } 
  notifyListeners();   
}

}